essentialsdocsfandomcom-20200214-history
Game intro
This page describes the beginning of games. This includes the intro screens, the splash (title) screen and "Continue/New Game" options, as well as the Professor's lecture. Intro screens The intro screens are the first things to be seen upon running a game. Each intro screen is a picture in the folder "Graphics/Titles", and their names and display order are determined by a list (highlighted) that appears in the script section Main in def pbCallTitle: return Scene_Intro.new(intro1}}', 'splash') Here, there is only one splash screen ("intro1.png") to display. You can expand on this list and modify the names of the files like so: return Scene_Intro.new('intro1','intro2','intro3', 'splash') The script section Scene_Intro contains the code for displaying the intro screens. They fade in and out, and are displayed in the order they are listed in the line above. You will not normally need to edit this section, but you may wish to change the speed at which the intro screens appear and linger for. To do this, find the following line in def openPic: @pic.moveOpacity(10,0,255) The number "10" here is the speed of the fading in and out. It is the number of frames it takes to do each (remember there are 40 frames in a second), i.e. it fades in over a period of 1/4 second, and fades out just as quickly. The bigger this number, the slower the fading. The amount of time each screen lingers for is set in def timer, with this line: if @timer>80 Again, the number here is a number of frames (80 frames = 2 seconds). Note that if the player presses the use button, the currently displayed intro screen will start to fade out immediately, before the end of the 80 frames is reached. It is important to note that the intro screens (along with the splash screen) are skipped when starting the game in Debug mode. Debug mode will automatically begin a game with the "Continue/New Game" screen. Splash screen The splash screen, or start/title screen, is a single picture in the folder "Graphics/Titles", with the name given by the highlighted part of the following line in the script section Main: return Scene_Intro.new('intro1', '{hl|splash}}') In addition, the picture "start.png" in the same folder will fade in/out continuously. The player must press the use button to close the splash screen and open the "Continue/New Game" screen. When they do, a random Pokémon's cry is played. It is important to note that the splash screen (along with the intro screens) is skipped when starting the game in Debug mode. Debug mode will automatically begin a game with the "Continue/New Game" screen. Continue/New Game This screen allows the player to continue their existing game (if appropriate), start a new game, open the Options screen, check for Mystery Gifts (if unlocked), or choose a language (if more than one is defined). There is also a button to access the main Debug menu. The background image for this screen is called "loadbg.png", which is located in the folder "Graphics/Pictures". If no such picture exists, a plain white background is displayed instead. The graphics for the buttons in this screen are in the image "loadPanels.png" in the same folder. The code that displays this screen is in the script section PScreen_Load. Professor's lecture When a new game is started, the first thing that usually happens is the Professor's lecture. This is an introduction to the world of Pokémon, and serves as a way to set the player's gender and name (and perhaps also the rival's name as well). The introduction screen is found in the map called "Intro". This map should contain the player's starting position. It also contains an event set to Autorun. The most basic form of the introduction event is as follows: @>Script: pbChangePlayer(0) @>Script: pbTrainerName @>Text: Hello, \PN. @>Control Self Switch: A =ON @>Transfer Player:\PN's house, (025,006), Down, No Fade This automatically sets the player to the male character (first command), and lets them choose their name (second command). Finally, it transfers the player to their actual starting place (typically their bedroom). The player's character and name must be set before the game starts. There are many ways in which this event can be expanded - Essentials contains a rather robust version in its example intro map.